import service from '@/utils/request.js'
// 将所有的针对course的请求，都封装到一个对象中
const chartApi = {
    selectCoachCount() {
        return service.get('/chart/selectCoachCount')
    },
    selectUserTotal() {
        return service.get('/chart/selectUserTotal')
    },
    selectCoachTotal() {
        return service.get('/chart/selectCoachTotal')
    },
    selectCourseTotal() {
        return service.get('/chart/selectCourseTotal')
    },
    selectReserveTotal() {
        return service.get('/chart/selectReserveTotal')
    },
    selectHotCourse() {
        return service.get('/chart/selectHotCourse')
    },
    selectUserCount(date) {
        return service.get('/chart/selectUserCount', {params: {date}})
    },
    selectReserveCount(date) {
        return service.get('/chart/selectReserveCount', {params: {date}})
    },
    // 用户个人相关API
    selectUserPersonalReserve(date, userId){
        return service.get('/chart/selectUserPersonalReserve', {params: {date, userId}})
    },
    selectUserPersonalReserveTotal(userId){
        return service.get('/chart/selectUserPersonalReserveTotal', {params: {userId}})
    },
    selectUserCourseTotal(userId){
        return service.get('/chart/selectUserCourseTotal', {params: {userId}})
    },
    selectUserActiveDays(userId){
        return service.get('/chart/selectUserActiveDays', {params: {userId}})
    },
    selectUserFavoriteCoach(userId){
        return service.get('/chart/selectUserFavoriteCoach', {params: {userId}})
    },
    // 教练个人相关API
    selectCoachPersonalReserve(date, coachId){
        return service.get('/chart/selectCoachPersonalReserve', {params: {date, coachId}})
    },
    selectCoachReserveTotal(coachId){
        return service.get('/chart/selectCoachReserveTotal', {params: {coachId}})
    },
    selectCoachCourseTotal(coachId){
        return service.get('/chart/selectCoachCourseTotal', {params: {coachId}})
    },
    selectCoachActiveDays(coachId){
        return service.get('/chart/selectCoachActiveDays', {params: {coachId}})
    }
}

export default chartApi